package com.converse.diamondreader.activities.findId;

import com.google.android.gms.tasks.OnFailureListener;
import com.google.android.gms.tasks.OnSuccessListener;
import com.google.android.gms.tasks.Task;
import com.google.mlkit.vision.text.Text;

import androidx.camera.core.CameraSelector;
import androidx.camera.core.ImageAnalysis;
import androidx.camera.core.ImageProxy;
import androidx.camera.core.Preview;

/**
 * Author: Administrator
 * Date: 2021/12/7
 * Project: DiamondReader
 * Description:
 */
public interface FindIdModel {

    CameraSelector buildCameraSelectorObj();

    ImageAnalysis buildImageAnalysisObj(int with,int height);

    Preview buildPreviewObj(int with,int height);

    Task<Text> processTextRecognition(ImageProxy image, OnSuccessListener<Text> onSuccess, OnFailureListener onFailure);

    String extractDiamondId(String text);
}
